import request from '@/utils/request'

export const followApi = {
  // 关注用户
  followUser(followerUserId, followingUserId) {
    return request({
      url: '/follows',
      method: 'post',
      data: {
        followerUserId,
        followingUserId
      }
    })
  },

  // 取消关注
  unfollowUser(followerUserId, followingUserId) {
    return request({
      url: '/follows',
      method: 'delete',
      params: {
        followerUserId,
        followingUserId
      }
    })
  },

  // 检查关注状态
  checkFollowStatus(followerUserId, followingUserId) {
    return request({
      url: '/follows/check',
      method: 'get',
      params: {
        followerUserId,
        followingUserId
      }
    })
  },

  // 获取用户的关注列表
  getFollowingList(userId) {
    return request({
      url: `/follows/following/${userId}`,
      method: 'get'
    })
  },

  // 获取用户的粉丝列表
  getFollowersList(userId) {
    return request({
      url: `/follows/followers/${userId}`,
      method: 'get'
    })
  }
} 